<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<h1>login</h1>

<div class="section">
	<c:if test="${not empty param.login_error}">
		<div class="errors">
			<fmt:message key="login.msg.failure"/><br /><br />
      <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>
		</div>
	</c:if>
</div>

<div class="section">
	<form name="f" action="<c:url value="/loginProcess" />" method="post">
		<fieldset>
			<div class="field">
				<div class="label"><label for="j_username">Username:</label></div>
				<div class="output">
					<input type="text" name="j_username" id="j_username"  />
				</div>
			</div>
			<div class="field">
				<div class="label"><label for="j_password">Password:</label></div>
				<div class="output">
					<input type="password" name="j_password" id="j_password" />
				</div>
			</div>
            <div class="form-buttons">
                <div class="button">
                    <input name="submit" id="submit" type="submit" value="Login" />
                </div>
            </div>
		</fieldset>
	</form>
</div>
